package com.pioneer.web.book.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDate;

/**
 *
 * @TableName borrow_record
 */
@TableName(value ="borrow_record")
@Data
public class BorrowRecord {
    /**
     * 借阅表ID
     */
    @TableId
    private Long id;

    /**
     * 借阅用户ID
     */
    private Long userId;

    /**
     * 借阅用户名
     */
    private String userName;

    /**
     * 图书ID
     */
    private Long bookId;

    /**
     * 图书标题
     */
    @TableField(exist = false)
    private String bookTitle;

    /**
     * 借阅时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate borrowTime;

    /**
     * 应归还时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate returnTime;

    /**
     * 实际归还时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate actualReturnTime;

    /**
     * 状态(0未归还/1已归还)
     */
    private String status;
    /**
     * 逾期( 0否 / 1是 )
     */
    private String overdue;
}
